﻿using System.Collections.Generic;
using BoldBrick.OneIntranet.HR.Properties;
using BoldBrick.SharePoint.CommonControls.DataObjects.Base;

namespace BoldBrick.OneIntranet.HR.DataObjects.ContentTypes.WorkflowsContentTypes
{
	/// <summary>
	/// Metadata class of "Workflow Step" content type
	/// </summary>
	public class WorkflowStepContentType : BaseContentType
	{
		#region ------ Content Type ID ------------------------------------------------------------

		protected override string GetContentTypeID()
		{
			return Settings.Default.ContentType_WorkflowStep_ID;
		}

		#endregion

		#region ------ Columns --------------------------------------------------------------------

		public override List<ListColumn> GetListColumns()
		{
			List<ListColumn> columns = new List<ListColumn>
			                           	{
			                           		SiteColumns.TaskOwnerColumn
			                           	};

			// add child columns
			columns.AddRange(GetChildListColumns());
			
			// add rest of parent columns
			columns.Add(SiteColumns.ResultContentTypeLookupColumn);
			columns.Add(SiteColumns.TaskContentTypeLookupColumn);
			columns.Add(SiteColumns.TaskTitleColumn);
			columns.Add(SiteColumns.TaskDescriptionColumn);
			columns.Add(SiteColumns.SendEmailColumn);
			columns.Add(SiteColumns.CancelIfNoHireColumn);

			columns.Add(SiteColumns.WorkflowStepOrderColumn);

			return columns;
		}

		/// <summary>
		/// Gets columns in child content type
		/// </summary>
		/// <returns>Returns columns in child content type</returns>
		protected virtual List<ListColumn> GetChildListColumns()
		{
			return new List<ListColumn>();
		}

		#endregion

		protected override string GetNameResourceKey()
		{
			return "ContentType_WorkflowStep_Name";
		}

		protected override string GetDescriptionResourceKey()
		{
			return "ContentType_WorkflowStep_Description";
		}
	}
}
